/**
 * 
 */
package com.et114.modules.products.securitydoor.dao;

import com.et114.components.simpletable.DataList;
import com.et114.components.simpletable.dao.SimpleTableDAOImpl;
import com.et114.modules.products.search.SearchVo;
import com.et114.modules.products.securitydoor.vo.SecurityDoor;

import java.util.*;

/*
 * @author guanhw
 */
public class SecuritySystemDao extends SimpleTableDAOImpl {
	
	public DataList getSecuritySystems( SecurityDoor vo ) throws Exception {
		return queryListDataList( vo , "getSecuritySystems" ) ; 
	}
	
	@ SuppressWarnings ( "unchecked" )
	public List< SecurityDoor > getSecuritySystemsList( SecurityDoor vo ) throws Exception {
		return queryList( vo , "getSecuritySystemsNpage" ) ; 
	}	
	
	@ SuppressWarnings ( "unchecked" )
	public List< SecurityDoor  > getSecuritySystemsHasOffTime( SecurityDoor vo ) throws Exception {
		return queryList( vo , "getSecuritySystemsHasOffTime" ) ; 
	}
	
	public Long saveSecuritySystems( SecurityDoor vo ) throws Exception { 
		return ( Long )insert ( vo , "insertSecuritySystem" ) ;
	}
	
	public void updateSecuritySystems( SecurityDoor vo ) throws Exception { 
		update( vo , "updateSecuritySystem" ) ; 
	}
	
	public void updateSecuritySystemProOnOffStatus( SecurityDoor vo ) throws Exception { 
		update( vo , "updateSecuritySystemProOnOffStatus" ) ; 
	}
	
	public SecurityDoor getSecuritySystem( Long id  ) throws Exception {  
		return ( SecurityDoor ) load( id , "getSecuritySystemById" ) ;
	}
	
	public void removeSecuritySystem( Long id ) throws Exception {
		delete( id , "removeSecuritySystem" ) ;
	}
	// 4 q
	
	public DataList getSecuritySystems4View( SecurityDoor vo ) throws Exception {
		return queryListDataList( vo , "getSecuritySystems4View" ) ; 
	}
	
	public SecurityDoor getBaseSecuritySystemById4View( SecurityDoor vo  ) throws Exception {  
		return ( SecurityDoor ) load( vo , "getBaseSecuritySystemById4View" ) ;
	}	

	public SearchVo getSecuritySystem4Compass( Long proId ) {
		return ( SearchVo )load(  new SearchVo( proId ) , "getSecuritySystem4Compass" ) ;
	}
}


